package com.su.middle.services;

public class ProposalServicesProxy implements com.su.middle.services.ProposalServices {
  private String _endpoint = null;
  private com.su.middle.services.ProposalServices proposalServices = null;
  
  public ProposalServicesProxy() {
    _initProposalServicesProxy();
  }
  
  public ProposalServicesProxy(String endpoint) {
    _endpoint = endpoint;
    _initProposalServicesProxy();
  }
  
  private void _initProposalServicesProxy() {
    try {
      proposalServices = (new com.su.middle.services.ProposalServicesServiceLocator()).getProposalServicesPort();
      if (proposalServices != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)proposalServices)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)proposalServices)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (proposalServices != null)
      ((javax.xml.rpc.Stub)proposalServices)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.su.middle.services.ProposalServices getProposalServices() {
    if (proposalServices == null)
      _initProposalServicesProxy();
    return proposalServices;
  }
  
  public void updateProposal(int arg0, java.lang.String arg1) throws java.rmi.RemoteException{
    if (proposalServices == null)
      _initProposalServicesProxy();
    proposalServices.updateProposal(arg0, arg1);
  }
  
  public com.su.middle.services.Proposals[] getStudentProposals(java.lang.String arg0) throws java.rmi.RemoteException{
    if (proposalServices == null)
      _initProposalServicesProxy();
    return proposalServices.getStudentProposals(arg0);
  }
  
  public int createProposal(com.su.middle.services.Proposals arg0) throws java.rmi.RemoteException{
    if (proposalServices == null)
      _initProposalServicesProxy();
    return proposalServices.createProposal(arg0);
  }
  
  
}